package net.kazed.nextaction.toplevel.activity;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import net.kazed.nextaction.database.ApplicationPreferences;
import net.kazed.nextaction.database.TaskCleaner;

public class BootstrapActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle icicle) {
	   super.onCreate(icicle);

	   Class<? extends Activity> activityClass = null;
	   boolean firstTime = new ApplicationPreferences(this).isFirstTime();
	   if (firstTime) {
	      activityClass = AboutActivity.class;
	   } else {
	      activityClass = TopLevelActivity.class;
	   }

	   // start the cleaning service
	   TaskCleaner.getInstance(this).schedule();
	   startActivity(new Intent(this, activityClass));
	   finish();
	}
	
}
